#include <stdlib.h>
#include <stdio.h>
#define N 80

int fun(char s[], char ch) {
    int c = 0;
    for (char *p = s; *p; ++p)
        if (*p == ch) ++c;
    return c;
}

void main() {
    int n;
    char str[N], ch;
    system("CLS");
    printf("\nInput a string:\n");
    gets(str);
    printf("\nInput a character:\n");
    scanf("%c", &ch);
    n = fun(str, ch);
    printf("\nnumber of %c:%d\n", ch, n);
}